<!doctype html>
<html>
<head>
<meta charset="utf-8">
<link href="__ROOT__/Public/admin/css/style.css" rel="stylesheet">
<link href="__ROOT__/Public/admin/css/font-awesome.min.css" rel="stylesheet">
<link rel="stylesheet" href="__ROOT__/Public/plugin/editor/themes/default/default.css" />
<link href="__ROOT__/Public/plugin/select2/select2.css" rel="stylesheet">
<script charset="utf-8" src="__ROOT__/Public/plugin/editor/kindeditor.js"></script>
<script charset="utf-8" src="__ROOT__/Public/plugin/editor/lang/zh_CN.js"></script>
<script charset="utf-8" src="__ROOT__/Public/js/jquery.min.js"></script>
<title>{$title}</title>
</head>
<style>
        #imgList{
            max-width:510px;
        }
        #imgList .imgBox{
            width:160px;
            height:100px;
            position:relative;
            float:left;
            overflow:hidden;
            border:1px solid #ccc;
            margin-right:5px;

        }
        .imgBox img{
            width:156px;
            height:96px;
            margin:2px 2px;
        }
        .close_icon{
            position:absolute;
            cursor:pointer;
            right:0px;
            top:-5px;
            color:#666;
            display:none;
            font-size:14px;
        }
        .borders{
            position:relative;
            width:400px;
            height:20px;
        }
        .borders div,.borders span{
            display:inline-block;
        }
    </style>
    
<body>
    <div class="breadNav">
          <ul class="breadNavBar">
              <li><i class="icon-home" style="font-size:16px"></i></li>
              <li><a href="javascript:;" onClick="parent.location.reload('/Admin/Main/index');">首页</a></li>
              <li>&gt;</li>
              <li>添加用户组</li>
           
          </ul>
    </div>
    <div style="clear:both;"></div>
    <div class="filter">
        <a href="__ROOT__/Admin/AuthManage/GroupList" class="btn btn-primary btn-lg" id="backBtn"><i class="icon-reply"></i>&nbsp;返回</a>
    </div>
    <form class="from" action="__ROOT__/Admin/AuthManage/addGroup" method="post">
              
              <div class="form-group">
	            <label class="control-label">用户组名字</label>
	            <input type="text" name="name" class="form-control" style="width:200px">
	            <span class="helpBlock"></span>
	          </div> 
	        
	         <div class="form-group">
	            <label class="control-label">用户组状态</label>
	            <select name='status'>
	             <option value='0'>禁用</option> 
	             <option value='1'>启用</option> 
	            </select>
	            <span class="helpBlock"></span>
	        </div> 
        
            <div class="form-group">
            <label class="control-label">&nbsp;</label>
            <input type="submit" class="btn btn-primary" value="提交"/>
        </div> 
       
    </form>
</body>
<script src="__ROOT__/Public/js/jquery.min.js?ver=1.8.3"></script>
<script src="__ROOT__/Public/admin/js/main.js"></script>
<script src="__ROOT__/Public/js/vali.js"></script>
<script src="__ROOT__/Public/js/prompt.js"></script>
<script src="__ROOT__/Public/plugin/select2/select2.min.js"></script>
<script>
// $(document).ready(function(){
// 	$("#isShow").val("{$categoryInfo.isShow}");
// 	$("form").vali({
// 		"control":[
// 			{"id":"catName","rule":"notNull","errorText":""}
// 		]
// 	})
// });
</script>

<script>
   KindEditor.ready(function(K) {
        var editorgoodsCover = K.editor({
            basePath: '__ROOT__/Public/plugin/editor/'
            ,uploadJson : '__ROOT__/Public/plugin/fileup/upload_json.php?type=image&m=pic_guid'
            ,fileManagerJson : '__ROOT__/Public/plugin/fileup/file_manager_json.php?type=image&m=pic_guid'
            ,allowFileManager:true
        });
        
         window.editor = K.create('#goodsContent',{
            width : '700px'
            ,height: '300px'
            ,basePath: '__ROOT__/Public/plugin/editor/'
            ,uploadJson : '__ROOT__/Public/plugin/fileup/upload_json.php?type=image&m=pic_guid'
            ,fileManagerJson : '__ROOT__/Public/plugin/fileup/file_manager_json.php?type=image&m=pic_guid'
            ,allowFileManager:true
            ,afterChange:function(){ //内容发生变化后
                this.sync();
            }
            ,afterFocus:function(){ //得到焦点时
                this.sync();
            }
            ,afterBlur: function(){ //失去焦点时
                this.sync();
            }
        });
    });
   $(document).ready(function() {
       $('#catID').select2();
       $("form").vali({
           "control": [
               {"id": "title", "rule": "notNull", "errorText": ""},
               {"id": "content", "rule": "notNull", "errorText": ""},
           ]
       })
   });
    //     var jsons = $("#goodsImages").val().split(",");
    //     drawPhoto(jsons);
    //     var i =4;

    //     $("#imgList").on("mouseover",".imgBox",function(){
    //         $(this).find(".close_icon").show();
    //     }).on("mouseout",function(){
    //         $(this).find(".close_icon").hide();
    //     })
    //     $("#imgList").on("click",".close_icon",function(){
    //         $(this).parents(".imgBox").remove();
    //         var tempStr = $("#goodsImages").val().replace($(this).siblings("img").attr("src")+",","");
    //         $("#goodsImages").val(tempStr);
    //     })
    //     $(".imgBox").on("click",function(){
    //         var url = $(this).find("img").attr("src");
    //         if(confirm("是否设置为封面图片")){
    //             $("#goodsCoversrc").attr("src",url);
    //             $("#goodsCover").val(url);
    //         }
    //     })
    // });
    function drawPhoto(jsons){
        if(jsons.length>1){
            $("#imgList").html("");
        }
        for(var i =0;i<jsons.length-1;i++){
            $("#imgList").append("<div class='imgBox'><div class='close_icon'><i class='icon-remove-sign'></i></div><img src='"+jsons[i]+"'></div>");
        }

    }
</script>

</html>
